 pipeline {
     agent any
     options { disableConcurrentBuilds() }
     stages {
         stage('begin') {
             steps {
                 script {
                     echo "test"
                     env.current_git_commit = new Date().format('yyyyMMddHHmmss')
                     def data = readFile(file: "productionSuccessCommitId")
                     println(data)
                 }
             }
         }
     }
     post {
         success {
             script {
                 echo "成功了"
                 writeFile file: "productionSuccessCommitId", text: env.current_git_commit
             }
         }
         failure {
             script {
                 echo "失败了"
             }
         }
     }
 }
